<template>
  <div v-loading="loading">
    <h3>
      <span>显示访问量：{{data.uv}}次</span>、
      <span>实际访问量：{{data.uv_info}}次</span>

    </h3>
    <h3>
      <span>总人数：{{data.people}}人</span>、
      <span>总票数：{{data.all_piao}}票</span>
    </h3>
    <h3 v-if="userinfo.is_show_sy==0" style="color: red;">总收益：{{data.all_sy}}元、今日收益：{{data.day_sy}}元</h3>
  </div>
</template>

<script>
  // 引入api
  import api from '@/api/vote/activity.js'
  export default {
    props:['id'],
    data() {
      return {
        loading:true,
        data:[],
        userinfo:JSON.parse(localStorage.getItem("userInfo"))
      }
    },
    methods:{
      a(){
        this.loading = true
        var than = this
        api.get_activity_data({
          id:this.id
        }).then(res => {
          this.data = res.data

          than.loading = false
        })
      }
    },
    created() {
      this.a()
    }
  }


</script>

<style>
</style>
